//
//  BaseTabBarViewController.m
//  SheerKrystal1
//
//  Created by 李雪 on 16/1/16.
//  Copyright © 2016年 「ゆき」. All rights reserved.
//

#import "BaseTabBarViewController.h"
#import "Sheer_DataHeader.h"


@interface BaseTabBarViewController ()

@end

@implementation BaseTabBarViewController

-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
        NSLog(@"%s",__FUNCTION__);
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    // tarBarViewController
    [self createTabBarView];
    
    // backGroundColor
    [self configureTabBarColor];
    
    
}

// 电池栏
-(BOOL)prefersStatusBarHidden
{
    return YES;
}

-(BOOL)providesPresentationContextTransitionStyle
{
    return YES;
}

#pragma mark - 创建tabBar
-(void)createTabBarView
{
    // main
//    MainViewController *main = [[[MainViewController alloc]init]autorelease];
//    UINavigationController *mainVC = [[[UINavigationController alloc]initWithRootViewController:main]autorelease];
//    //mainVC.title = @"sheer";
//    mainVC.navigationBar.tintColor = [UIColor colorWithRed:140/255. green:165/255. blue:240/255. alpha:1];
//    mainVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"home" image:[UIImage imageNamed:@"dfvsgsg.png"] tag:1001];
    
    // hot
//    HotViewController *hot = [[[HotViewController alloc]init]autorelease];
//    UINavigationController *hotVC = [[[UINavigationController alloc]initWithRootViewController:hot]autorelease];
//    hotVC.navigationBar.tintColor = [UIColor colorWithRed:140/255. green:165/255. blue:240/255. alpha:1];
//    hotVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"hot" image:[UIImage imageNamed:@"hotBar.png"] tag:1002];
    
    // Item
//    ItemThirdViewController *item = [[[ItemThirdViewController alloc]init]autorelease];
//    UINavigationController *itemVC = [[[UINavigationController alloc]initWithRootViewController:item]autorelease];
//    itemVC.navigationBar.tintColor = [UIColor colorWithRed:140/255. green:165/255. blue:240/255. alpha:1];
//    itemVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"category" image:[UIImage imageNamed:@"fenlei.png"] tag:1003];
    
    // set up
//    SetViewController *set = [[[SetViewController alloc]init]autorelease];
//    UINavigationController *setVC = [[[UINavigationController alloc]initWithRootViewController:set]autorelease];
//    setVC.navigationBar.tintColor = [UIColor colorWithRed:140/255. green:165/255. blue:240/255. alpha:1];
//    setVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"sheer" image:[UIImage imageNamed:@"me.png"] tag:1004];
//    self.viewControllers = @[mainVC,hotVC,itemVC,setVC];
    
}

#pragma mark - tabBar/NavigationBar 颜色
-(void)configureTabBarColor
{
    [UINavigationBar appearance].barTintColor = [UIColor colorWithRed:255/255. green:228/255. blue:225/255. alpha:1];
    [[UITabBar appearance] setBarTintColor:[UIColor colorWithRed:255/255. green:228/255. blue:225/255. alpha:1]];
    
   
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    if ([self isViewLoaded] && !self.view.window) {
        self.view = nil;
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
